package pingan.com.imandtwo.g_mvp.model;

import java.util.Map;

import io.reactivex.Flowable;
import pingan.com.imandtwo.bean.Shouye;
import pingan.com.imandtwo.g_mvp.RetrofitUtil;
import pingan.com.imandtwo.g_mvp.presenter.Presenter;

/**
 * Created by 迷人的脚毛！！ on 2018/2/6.
 */

public class Model implements IMModel {
    private Presenter presenter;

    public Model(Presenter presenter) {
        this.presenter = presenter;
    }

    @Override
    public void getData(String url, Map<String, String> map) {
        Flowable<Shouye> shouye = RetrofitUtil.getInstant(url).getApiService().getShouye(map);
        presenter.getShouye(shouye);
    }
}
